<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>async和await</title>
</head>
<body>
<script>
  async function main() {

    // throw "Err"

    // return "111"

    // return Promise.resolve("ok")

    // let r1 = await 20

    // let r2 = await new Promise((resolve, reject) => {
    //   resolve('ok')
    // })

    try {
      let r3 = await new Promise((resolve, reject) => {
        reject('ERR')
      })
    } catch (e) {
      console.log(e);
    }

  }

  main()

</script>
</body>
</html>